package com.demodis.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.demodis.dao.PositionDaoI;
import com.demodis.dao.impl.PositionDaoImpl;
import com.demodis.domain.TblPosition;
import com.demodis.service.PositionServiceI;

public class PositionServiceIpml implements PositionServiceI {
	
	PositionDaoI posDao = new PositionDaoImpl();

	@Override
	public boolean save(TblPosition t) {
		return posDao.save(t);
	}

	@Override
	public boolean delete(TblPosition t) {
		return posDao.delete(t);
	}

	@Override
	public boolean modify(TblPosition t) {
		return posDao.modify(t);
	}

	@Override
	public Object get() {
		List<TblPosition> list= posDao.get();
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("total", list.size());
		map.put("rows", list);
		return map;
	}
	
	@Override
	public Object getPositionComboBoxData() {
		return posDao.get();
	}

}
